#include <stdio.h>
#include <conio.h>
#include <math.h>

double dfdx(double, double);
double EilerSolver(double, double, double, double);

void main()
{
  printf("\n Solve=%g", EilerSolver(1.4,2.2,2.4,0.1));
  getch();
};

double dfdx(double x, double y)
{
  return x+cos(y/2.25);
};

double EilerSolver(double x0,double y0,double xn,double h)
{double x,y;
  x=x0;
  y=y0;
  while(x<=xn)
  {
    y=y+h*dfdx(x,y);
    x=x+h;
  };
  return y;
};
